/**
 * Created by Administrator on 2017/3/27 0027.
 */
Page3={
    Create:function(){
        var page={};

        var map;
        map=arr_texture[12];
        var picG=new THREE.PlaneGeometry(198,86,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic1=new THREE.Mesh(picG,picM);

        map=arr_texture[13];
        var picG=new THREE.PlaneGeometry(85,9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic2=new THREE.Mesh(picG,picM);

        map=arr_texture[14];
        var picG=new THREE.PlaneGeometry(198,86,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic3=new THREE.Mesh(picG,picM);

        map=arr_texture[15];
        var picG=new THREE.PlaneGeometry(39,9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic4=new THREE.Mesh(picG,picM);

        map=arr_texture[16];
        var picG=new THREE.PlaneGeometry(193,86,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic5=new THREE.Mesh(picG,picM);

        map=arr_texture[17];
        var picG=new THREE.PlaneGeometry(148,9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic6=new THREE.Mesh(picG,picM);

        map=arr_texture[18];
        var picG=new THREE.PlaneGeometry(198,86,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic7=new THREE.Mesh(picG,picM);

        map=arr_texture[19];
        var picG=new THREE.PlaneGeometry(130,9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic8=new THREE.Mesh(picG,picM);

        map=arr_texture[20];
        var picG=new THREE.PlaneGeometry(623,142,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic9=new THREE.Mesh(picG,picM);

        var purpleG=new THREE.PlaneGeometry(1136,740,1,1);
        var purpleM=new THREE.MeshBasicMaterial({color:0x806d85,tranparent:true});
        var purpleBG=new THREE.Mesh(purpleG,purpleM);




        pic1.position.set(300,220,100);
        pic2.position.set(240,140,200);
        pic3.position.set(300,90,100);
        pic4.position.set(230,20,200);
        pic5.position.set(300,-60,100);
        pic6.position.set(230,-110,200);
        pic7.position.set(300,-200,100);
        pic8.position.set(230,-230,200);
        pic9.position.set(-200,0,50);


        pic1.material.opacity=0;
        pic2.material.opacity=0;
        pic3.material.opacity=0;
        pic4.material.opacity=0;
        pic5.material.opacity=0;
        pic6.material.opacity=0;
        pic7.material.opacity=0;
        pic8.material.opacity=0;
        pic9.material.opacity=0;

        // pic3.scale.x=1.2; pic3.scale.y=1.2;
        // pic5.scale.x=1.3; pic5.scale.y=1.3;
        // pic7.scale.x=1.1; pic7.scale.y=1.1;
        pic9.scale.x=0.9;pic9.scale.y=0.9;



        scene.add(pic1);scene.add(pic2);scene.add(pic3);scene.add(pic4);scene.add(pic5);scene.add(pic6);
        scene.add(pic7);scene.add(pic8);scene.add(pic9);

        // scene.add(purpleBG);
        // purpleBG.material.opacity=0.2;
        purpleBG.material.blending="SubtractiveBlending";
        // purpleBG.renderOrder=0;

        page.start=function() {

            renderer.setClearColor(0x806d85);

            pic1.position.y += 10;
            pic3.position.y += 10;
            pic5.position.y += 10;
            pic7.position.y += 10;
            TweenMax.to(pic1.position, 0.7, {delay: 0, y: pic1.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic3.position, 0.7, {delay: 0.3, y: pic3.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic5.position, 0.7, {delay: 0.6, y: pic5.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic7.position, 0.7, {delay: 0.9, y: pic7.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic1.material, 0.7, {delay: 0, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.7, {delay: 0.3, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic5.material, 0.7, {delay: 0.6, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.7, {delay: 0.9, opacity: 1, ease: Cubic.easeOut});


            pic2.position.x += 30;
            pic4.position.x += 30;
            pic6.position.x += 30;
            pic8.position.x += 30;
            TweenMax.to(pic2, 1, {delay: 0.9, x: pic2.position.x-30, ease: Cubic.easeOut});
            TweenMax.to(pic4, 1, {delay: 1.2, x: pic4.position.x-30, ease: Cubic.easeOut});
            TweenMax.to(pic6, 1, {delay: 1.5, x: pic6.position.x-30, ease: Cubic.easeOut});
            TweenMax.to(pic8, 1, {delay: 1.8, x: pic8.position.x-30, ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 1, {delay: 0.9, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 1, {delay: 1.2, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic6.material, 1, {delay: 1.5, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic8.material, 1, {delay: 1.8, opacity: 1, ease: Cubic.easeOut});


            TweenMax.to(pic9.material, 0.7, {delay: 2, opacity: 1, ease: Cubic.easeOut});
        }
        page.end=function(){
            TweenMax.to(pic1.material, 0.6, {delay: 0.1, opacity:0 , ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 0.6, {delay: 0.2, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.6, {delay: 0.3, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 0.6, {delay: 0.4, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic5.material, 0.6, {delay: 0.5, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic6.material, 0.6, {delay: 0.6, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.6, {delay: 0.7, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic8.material, 0.6, {delay: 0.8, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic9.material, 0.6, {delay: 0.9, opacity: 0, ease: Cubic.easeOut});


        }





        return page;
    }
}